<template>
    <div class="container" v-if="type === 'password'">
        <div class="title">修改登录密码成功！</div>
        <div class="tip">为了您的账号安全，改密成功后，将全网注销退出，请重新登录</div>
        <div class="img"><img src="/images/result-success.png"></div>
        <el-button class="btn" type="primary" @click="goback">重新登录</el-button>
    </div>
    <div class="container" v-else>
        <div class="title">修改绑定邮箱成功！</div>
        <div class="img"><img src="/images/result-success.png"></div>
        <el-button class="btn" type="primary" @click="goback">返回</el-button>
    </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
const router = useRouter()
let { type } = defineProps<{
    type: string,
}>()
let goback = () => {
    if (type == 'password') {
        router.push('/login')
    } else {
        router.back()
    }
}
</script>


<style scoped lang="less">
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;

    &>* {
        margin-bottom: 15px;
    }

    .title {
        font-size: 22px;
    }

    .tip {
        font-size: 12px;
        color: #6d757a;
    }

    .img {
        img {
            width: 100%;
            height: 100%;
        }
    }

    .btn {
        width: 100px;
    }
}
</style>
